/*
* 判断是否是移动端
* */
const isMobile = () => {
    // 获取User-Agent字符串
    const userAgent = navigator.userAgent || navigator.vendor
    const keywords = [ 'Android', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'IEMobile','Opera Mini', 'Windows Phone', 'Mobile'];

    for (const keyword of keywords) {
        if (userAgent.indexOf(keyword) !== -1) {
            return true;
        }
    }
    return false;
}

export default isMobile